﻿using System.Net;

namespace Ipmce.RemoteVoting.Backend.SmsGateway.Processing
{
	class SmsSender : ISmsSender
	{
		private readonly string _serverAddress;

		public SmsSender(string serverAddress)
		{
			_serverAddress = serverAddress;
		}

		public void Send(string number, string text)
		{
			number = number.Replace("+7", "8");
			var request = WebRequest.Create(_serverAddress + "?phone=" + number + "&text=" + text);
			request.Method = "GET";
			request.GetResponse();
		}
	}
}